]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Vertically center align week numbers
authorJoonas Henriksson <joonas.henriksson@gmail.com>
Mon, 17 Aug 2020 14:15:25 +0000 (17:15 +0300)
committerJoonas Henriksson <joonas.henriksson@gmail.com>
Fri, 21 Aug 2020 18:40:22 +0000 (21:40 +0300)
The labels were previously aligned by using top-padding, which was
relative to font-size, and therefore didn't always align the text
correctly when font scaling was enabled.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1415

data/theme/gnome-shell-sass/widgets/_calendar.scss
js/ui/calendar.js

index 4f567a82dcc94927356a8cf53f4a950092436f5f..16391a14e986e732039f0a5f508d384e1edd830c 100644 (file)
     height: 1.8em;
     width: 2.3em; 
     border-radius: 2px;
-    padding: 0.5em 0 0;
     margin: 6px;
     background-color: darken($bg_color, 2%);
     color: lighten($fg_color, 5%);
index 6a5f024f71161d32f61743a9717fd4dc26b378a1..710efbac450806e014e2359a835f4f4dd622b97e 100644 (file)
@@ -680,6 +680,7 @@ var Calendar = GObject.registerClass({
                                            style_class: 'calendar-day-base calendar-week-number',
                                            can_focus: true });
                 let weekFormat = Shell.util_translate_time_string(N_("Week %V"));
+                label.clutter_text.y_align = Clutter.ActorAlign.CENTER;
                 label.accessible_name = iter.toLocaleFormat(weekFormat);
                 layout.attach(label, rtl ? 7 : 0, row, 1, 1);
             }